package com.atguigu.springcloud.service.impl;

import com.atguigu.springcloud.dao.StorageDao;
import com.atguigu.springcloud.entity.CommonResult;
import com.atguigu.springcloud.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @NAME: StorageServiceImpl
 * @USER: Administrator
 * @DESCRIPTION:
 **/
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {

    @Resource
    private StorageDao storageDao;

    /**
     * 删除库存
     *
     * @param productId
     * @param count
     */
    @Override
    public void delcreate(Long productId, Integer count) {

        log.info("正在扣减库存。。。。。。");
        storageDao.delcreate(productId, count);
        log.info("扣减库存结束啦。。。。。");
    }
}
